using System;
using System.Collections.Generic;

namespace Mes.Production.Models
{
    /// <summary>
    /// 前端使用的生产订单详情模型（与后端返回字段对齐）
    /// </summary>
    public class ProductionOrderDetailDto
    {
        public int Id { get; set; }
        public string OrderNumber { get; set; }
        public int OrderSource { get; set; }
        public string Remarks { get; set; }
        public DateTime? CreateTime { get; set; }
        public List<ProductionOrderDetailItemDto> Items { get; set; }

        public ProductionOrderDetailDto()
        {
            OrderNumber = string.Empty;
            Remarks = string.Empty;
            Items = new List<ProductionOrderDetailItemDto>();
        }
    }

    /// <summary>
    /// 生产订单详情-明细项模型
    /// </summary>
    public class ProductionOrderDetailItemDto
    {
        public int Id { get; set; }
        public int MaterialId { get; set; }
        public string FinishedNo { get; set; }
        public string FinishedName { get; set; }
        public string Specification { get; set; }
        public string Unit { get; set; }
        public double PlannedQuantity { get; set; }
        public DateTime? DeliveryDate { get; set; }

        public ProductionOrderDetailItemDto()
        {
            FinishedNo = string.Empty;
            FinishedName = string.Empty;
            Specification = string.Empty;
            Unit = string.Empty;
        }
    }
}



